<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li class="active"><strong>活跃商户活动配置</strong></li>
		</ol>
	</div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	ng-controller="selectHlfActivityMerchantCtrl">
	<form class="form-horizontal" id="form1" name="horizontal">
		<div class="row">
			<div class="col-lg-12" style="padding-bottom: 80px;">
				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>活跃商户活动配置</h5>
					</div>
					<div class="ibox-content">
						<div class="form-group">
							<label class="col-sm-2 control-label">活动ID：</label>
							<div class="col-sm-2">
								<input type="text" class="form-control" ng-model="activityMerchant.ruleId">
							</div>
							<label class="col-sm-2 control-label">活动名称：</label>
							<div class="col-sm-2">
								<input type="text" class="form-control" ng-model="activityMerchant.ruleName">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-7">
								<button class="btn btn-primary6 btn-mr20" type="button" ng-click="query()">查询</button>
								<button class="btn btn-primary3 btn-mr20" type="button" ng-click="clear()">清空</button>
								<button class="btn btn-primary5 btn-mr20" type="button" ng-show="hasPermit('activity.addHlfActivityMerchantRule')" ng-click="hardWardAddModel()">新增</button>
								<a class="btn btn-primary4" ui-sref="func.happyReturnType" >返回</a>
							</div>
						</div>
					</div>

					<div class="panel-body ibox float-e-margins">
						<div class="ibox-title">
							<div class="ibox-content">
								<div class="form-group">
									<div class="gridStyle" ui-grid="gridOptions" ui-grid-selection ui-grid-pagination
										 ui-grid-resize-columns ui-grid-pinning></div>
									<div ng-show="loadImg" class="timg"></div>
								</div>
							</div>
						</div>
						<div style="height:30px"></div>
					</div>
				</div>
			</div>
		</div>
	</form>

	<div id="hardWardAddModel" class="modal fade" tabindex="3"
		role="dialog">
		<form class="form-horizontal" id="form2">
			<div class="modal-dialog">
				<div class="modal-content" style="width: 900px">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							&times;</button>
						<h3 class="modal-title">添加活跃商户活动</h3>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-2 control-label">活动时间：</label>
							<div class="col-sm-8">
								<input id="d5554" class="form-control" type="datetime" ng-disabled="isDetail" placeholder="开始时间" ng-model="info.startTime" onchange=""  style="width:auto;display:inline-block;"
									   onFocus="var d5555=$dp.$('d5555');WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){d5555.focus();},maxDate:'#F{$dp.$D(\'d5555\')}'})"/>
								-
								<input id="d5555" class="form-control" type="datetime" ng-disabled="isDetail" placeholder="结束时间" ng-model="info.endTime" onchange=""  style="width:auto;display:inline-block;"
									   onFocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'d5554\')}'})"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">活动名称：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" ng-disabled="isDetail" name="ruleName" ng-model="info.ruleName" maxlength="30">
							</div>
						</div>
						<div class="form-group">
							<div class="ibox-title">
								<h5>首次注册奖励设置</h5>
							</div>
							<label class="col-sm-2 control-label">奖励考核月数：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.firstRewardMonth">
								<div style="float:left; padding:7px 0 0 10px"> 个月（自激活次月开始计算）</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="checkbox" style="float:left;" ng-true-value="1" ng-false-value="0" ng-disabled="isDetail" ng-model="info.firstRewardType">
								<div style="float:left;"> 任意1个月（在考核月数中有任意1个月达标即可）</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">累计交易金额：</label>
							<div class="col-sm-10" style="float:left">
								<div style="float:left; padding:7px 10px 0 10px"> ≥ </div>
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.firstRewardTotalAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">奖励金额：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.firstRewardAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元 </div>
							</div>
						</div>
						<div class="form-group">
							<div class="ibox-title">
								<h5>首次注册扣款设置</h5>
							</div>
							<label class="col-sm-2 control-label">扣款考核月数：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.firstDeductMonth">
								<div style="float:left; padding:7px 0 0 10px"> 个月（自激活次月开始计算）</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="checkbox" style="float:left;" ng-true-value="1" ng-false-value="0" ng-disabled="isDetail" ng-model="info.firstDeductType">
								<div style="float:left;"> 任意1个月（在考核月数中有任意1个月达标即可）</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">累计交易金额：</label>
							<div class="col-sm-10" style="float:left">
								<div style="float:left; padding:7px 10px 0 10px"> &lt; </div>
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.firstDeductTotalAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">扣款金额：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.firstDeductAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元 </div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label">重复注册与首次注册一致：</label>
							<div class="col-sm-5">
								<select class="form-control" ng-disabled="isDetail" ng-model="info.firstRepeatStatus"
										ng-options="x.value as x.text for x in bool">
								</select>
							</div>
						</div>

						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<div class="ibox-title">
								<h5>重复注册奖励设置</h5>
							</div>
							<label class="col-sm-2 control-label">奖励考核月数：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.repeatRewardMonth">
								<div style="float:left; padding:7px 0 0 10px"> 个月（自激活次月开始计算）</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="checkbox" style="float:left;" ng-true-value="1" ng-false-value="0" ng-disabled="isDetail" ng-model="info.repeatRewardType">
								<div style="float:left;"> 任意1个月（在考核月数中有任意1个月达标即可）</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label">累计交易金额：</label>
							<div class="col-sm-10" style="float:left">
								<div style="float:left; padding:7px 10px 0 10px"> ≥ </div>
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.repeatRewardTotalAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label">奖励金额：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.repeatRewardAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元 </div>
							</div>
						</div>
						<div class="form-group" ng-disabled="isDetail" ng-show="info.firstRepeatStatus==0">
							<div class="ibox-title">
								<h5>重复注册扣款设置</h5>
							</div>
							<label class="col-sm-2 control-label">扣款考核月数：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:100px" ng-disabled="isDetail" ng-model="info.repeatDeductMonth">
								<div style="float:left; padding:7px 0 0 10px"> 个月（自激活次月开始计算）</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="checkbox" style="float:left;" ng-true-value="1" ng-false-value="0" ng-disabled="isDetail" ng-model="info.repeatDeductType">
								<div style="float:left;"> 任意1个月（在考核月数中有任意1个月达标即可）</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label">累计交易金额：</label>
							<div class="col-sm-10" style="float:left">
								<div style="float:left; padding:7px 10px 0 10px"> &lt; </div>
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.repeatDeductTotalAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元</div>
							</div>
						</div>
						<div class="form-group" ng-show="info.firstRepeatStatus==0">
							<label class="col-sm-2 control-label">扣款金额：</label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control" style="float:left; width:120px" ng-disabled="isDetail" ng-model="info.repeatDeductAmount">
								<div style="float:left; padding:7px 0 0 10px"> 元 </div>
							</div>
						</div>
						<div class="form-group control-label">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button class="btn btn-primary btn-mr20" type="button" ng-show="!isDetail"
									ng-click='commit()'>确定</button>
								<button class="btn btn-primary8 " type="button" ng-show="!isDetail"
									ng-click='cancel()'>返回</button>
								<button class="btn btn-primary8 " type="button" ng-show="isDetail"
										ng-click='cancel()'>关闭</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>

</div>